package com.sanyang.pda.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.sanyang.pda.bean.TakeStockListBean;
import com.sanyang.pda.utils.Utils;
import com.wangshen.base.ui.mvp.base.adapter.BaseAdapter;
import com.wangshen.projectbase.R;

import java.util.List;

public class TakeStockListAdapter extends BaseAdapter<TakeStockListBean> {
    public TakeStockListAdapter(int layoutResId, @Nullable List<TakeStockListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, TakeStockListBean item) {
        super.convert(helper, item);
        helper.setText(R.id.tv_title,item.getTaskNo());
        helper.setText(R.id.tv_task_time,item.getTaskDate());
        helper.setText(R.id.tv_displayName,item.getDisplayName());
        helper.setText(R.id.tv_state, Utils.getTaskState(getContext(),item.getCountStatus()));
    }
}
